<?php
class Logout extends MY_Controller{
	function __construct(){
		parent::__construct();
		$this->folder = LOGOUT_FOLDER;
		$this->mainmodel = $this->mClient;
		$this->postConstructor();
	}
	
	function index(){
		if($this->folder == "admin" || $this->folder == "developer"){
				$this->session->unset_userdata(DEFAULT_ADMIN_PAGE);
				$this->session->unset_userdata(DEFAULT_ADMIN_FOLDER);
				$this->session->unset_userdata(ADMIN_USER_ID);
				$this->page = 'login';
				$this->redirecttorecordlist();
		}else{
			$this->session->unset_userdata(CLIENT_USER_ID);
			REDIRECT(base_url());
		}
	}
}